<?php
#============================
#	Filename: getcate.qgmod.php
#	Note	: 根据系统组ID得到分类ID
#	Version : 2.2
#	Author  : qinggan
#	Update  : 2008-5-11
#============================
global $FS,$DB,$prefix,$bi;
if(!$cateid)

{
	return false;
}
$md5 = md5(TemplateID."_".$cateid);
$cache_file = "data/cache/getcate_".$md5.".php";
$check_status = false;
if($iscache)
{
	$check_status = CheckCache($cache_file);
}
if($check_status)
{
	include_once($cache_file);
	unset($cache_file);
	return $catelist;
}
$cate_list = $DB->qgGetAll("SELECT id,catename".$bi." FROM ".$prefix."category WHERE sysgroupid='".$cateid."' AND status='1' ORDER BY taxis ASC,id DESC");

if(!$cate_list)
{
	return false;
}
$catelist2 = array();
#[对数组进行排序]
foreach($cate_list AS $key=>$value)
{
	$value["catename"] = $value["catename".$bi];
	$catelist2[] = $value;	
}

$catelist = $catelist2;
$FS->qgWrite($catelist,$cache_file,"catelist");
unset($cache_file);
return $catelist;
?>